<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var user = {
        name:"zhangsan",
        age:3,
        sex:'male'
    }
    var JsonUser = JSON.stringify(user)
    //json 字符串转化为对象
    var obj = JSON.parse('{"name":"zhangsan","age":3,"sex":"male"}')
</script>

</body>
</html>